#include "../../third_party/httplib.h"
#include <iostream>

int main()
{
    httplib::Server server;

    // using Handler = std::function<void(const Request &, Response &)>;
    server.Get("/hello",[](const httplib::Request & req, httplib::Response & resp)
    {
        std::cout << "method: " << req.method << std::endl;
        std::cout << "path: " << req.path << std::endl;

        std::string body = "<html><body><h1>Hello World</h1></body></html>";
        resp.set_content(body,"text/html");
        resp.status = 200;
    });

    server.listen("0.0.0.0",8080);
    return 0;
}
